<form class="editForm" action="${saveUrl}" method="post" responseType="JSON" role="form" id="editForm_${serializeNum}" 
	data-bv-submitButtons="#editFormSubmitBtn_${serializeNum}"
	data-bv-message="This value is not valid"
	data-bv-feedbackicons-valid="glyphicon glyphicon-ok"
	data-bv-feedbackicons-invalid="glyphicon glyphicon-remove"
	data-bv-feedbackicons-validating="glyphicon glyphicon-refresh">
	<input type="hidden" name="formKey" value="${formKey}">
	<input type="hidden" name="formToken" value="${formToken}">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal"
			aria-hidden="true">×</button>
		<h4 class="modal-title" id="dialog">编辑</h4>
	</div>
	<div class="modal-body">
		 <div class="row">
			<input type="hidden" name="id" value="${editEntity.id}">
			<div class="form-group">
				<label for="attrGroup.id" class="col-sm-2 control-label no-padding-right">所属分组</label>
				<div class="col-sm-10">
					<select  name="attrGroupId" class="selectpicker_${serializeNum}" data-live-search="true">
						<optgroup label="选择所属分组" data-icon="icon-ok">
							<option value="">无</option>
							<#list attrGroups as attrGroup >
								<option value="${attrGroup.id}">${attrGroup.attrName}</option>
							</#list>
						</optgroup>
					</select>
					<script type="text/javascript">
						$("[name='attrGroupId']").val("${editEntity.attrGroupId}");
					</script>
				</div>
			</div>
			<div class="form-group">
				<label for="attrName" class="col-sm-2 control-label no-padding-right">属性名</label>
				<div class="col-sm-10">
                   <input type=text class="form-control" name="attrName" id="attrName"
						placeholder="请输入属性名"
						value="${editEntity.attrName}"
					  	data-bv-message="The field is not valid"
                        data-bv-notempty="true"
                        data-bv-notempty-message="The field is required and cannot be empty"
                        data-bv-regexp="true"
                        data-bv-regexp-regexp="^[a-z,_]+\w*$"
                        data-bv-regexp-message="The field can only consist of alphabetical, number, dot and underscore">
                    <span class="text"></span>
				</div>
			</div>
			<div class="form-group">
				<label for="attrValue" class="col-sm-2 control-label no-padding-right">属性值</label>
				<div class="col-sm-10">
					<input type=text class="form-control" name="attrValue" id="attrValue"
						placeholder="请输入属性值"
						value="${editEntity.attrValue}"
						data-bv-message="The field is not valid"
						data-bv-notempty="true"
						data-bv-notempty-message="The field is required and cannot be empty"/>
                    <span class="text"></span>
				</div>
			</div>
			<div class="form-group">
				<label for="weight" class="col-sm-2 control-label no-padding-right">权重</label>
				<div class="col-sm-10">
                   <input type=text class="form-control" name="weight" id="weight"
						placeholder="请输入权重"
						value="${editEntity.weight}"
                        data-bv-integer="true"
                        data-bv-integer-message="The field is number"
                        data-bv-notempty="true"
                        data-bv-notempty-message="The field is required and cannot be empty" />
                     <span class="text"></span>
				</div>
			</div>
			<div class="form-group">
				<label for="isOnlySupportHtml5" class="col-sm-2 control-label no-padding-right">只支持HTML5</label>
				<div class="col-sm-10">
					<input type="hidden" name="isOnlySupportHtml5" value="${editEntity.isOnlySupportHtml5}">
                   	<label>
                       <input class="checkbox-slider slider-icon yesno" type="checkbox" data-target-input-name="isOnlySupportHtml5" ${(editEntity.isOnlySupportHtml5???string(editEntity.isOnlySupportHtml5?string("checked",""),""))!""}>
                       <span class="text"></span>
                   	</label>
				</div>
			</div>
			<div class="form-group">
				<label for="remark" class="col-sm-2 control-label no-padding-right">描述</label>
				<div class="col-sm-10">
					<textarea rows="5" class="form-control" name="remark" id="remark"
						placeholder="请输入描述"
						data-bv-message="The field is not valid"
						data-bv-notempty="true"
						data-bv-notempty-message="The field is required and cannot be empty">${editEntity.remark}</textarea>
                 	<span class="text"></span>
				</div>
			</div>
		</div>
	</div>
	<div class="modal-footer">
		<div class="form-group">
			<div class="col-sm-offset-5 col-sm-7">
				<input type="button" class="btn btn-default" data-dismiss="modal" value="取消"/>
				<button type="submit" class="btn btn-blue" id="editFormSubmitBtn_${serializeNum}">保存</button>
			</div>
		</div>
	</div>
</form>
<script src="assets/js/validation/bootstrapValidator_init.js"></script>
<script>
$(".selectpicker_${serializeNum}").select2();
</script>